<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="./../../html/res/css/style.css" />
<title>WBD 网络小说下载</title>
<meta name="description" content="网络小说下载">
<meta name="keyword" content="网络小说下载工具">
<script type="text/javascript" src="./../../html/res/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="./../../html/res/app.js"></script>
<style type="text/css">
<!--
.zcekk .sms_btn{width:210px; height:43px; line-height:43px; font-size:18px; color:#FFF; margin-right:30px;
}
-->
</style>
</head>
<body>
<div id="topbj">
<!-- $headnav$ -->
<div id="zhuce">
	<div class="zcelist"><b class="bzce ui_act_reg1">注册</b><span class="spanzce">已有账号？<a href="index.php?c=guest&a=denglu" class="zcesa">直接登录</a></span></div>
	<div style="width:100%;height:35px;">
	<div id="div_errormsg" class="zcelist0 hide"><b class="bzce"><span id="errormsg" style="color:#f00;"></span></b></div>
	<div id="div_okmsg" class="zcelist0 hide"><b class="bzce"><span id="okmsg" style="color:#0f0;"></span></b></div>
	</div>
	<form class="form-login" action="api2016.php?c=guest&a=registernew" method="post" id="login_form" onsubmit="send_form_in('login_form');return false;void(0);">
	<div class="zcekk">
			<ul>
				<li class="zcekkb"><img src="./../../html/res/images/zc1_03.jpg" width="8" height="47"  class="zcekkimg"/>
				<input type="text" id="sjh" name="email" class="zcekksr ud" value="请输入手机号" onFocus="if(value=='请输入手机号'){value=''}" onblur="if(value=='') {value='请输入手机号'}"/></li>
				<li class="denglubj"><span class="denglusp">图形验证码：</span>
					<span class="denglusp1"><input type="text" id="validate" name="validate" value="" size=10 class="denglukk"> </span>
					<img id="randCodeImg" width="102" height="47" class="left cp-hand" title="点击刷新" src="./php/lib/captcha/captcha.php" align="absbottom" onclick="refreshRandCode();"></img><a href="javascript:void(0);" class="btn_change" onclick="refreshRandCode()">点击刷新</a>
				</li>
				<li class="zcekkb1"><a href="javascript:void(0);" class="sms_btn" id="sendSmsBtn" onclick="sendSmsCode()"><i></i><span>短信获取验证码</span></a>
				</li>
				<li class="ui_step2"><span class="zcekkb zcekkspan"><img src="./../../html/res/images/zuc2_07.jpg" width="11" height="47"  class="zcekkimg1"/>
				<input type="text" id="smsvalidate" name="smsvalidate" class="zcekksr1 ud" value="请输入手机收到的验证码" onFocus="if(value=='请输入手机收到的验证码'){value=''}" onblur="if(value=='') {value='请输入手机收到的验证码'}"/></span>
				<!-- <span class="zcekkspan1 ui_get_validate">获取验证码</span> -->
				</li>
				<li class="zcekkb ui_step2"><img src="./../../html/res/images/zuc3_10.jpg" width="11" height="47"  class="zcekkimg1" />
				<input type="text" id="pw" name="pswd" class="zcekksr ud" value="请设置您的登录密码" onFocus="if(value=='请设置您的登录密码'){value=''}" onblur="if(value=='') {value='请设置您的登录密码'}"/></li>
				<li class="zceyh ui_step2"><img src="./../../html/res/images/zuc6_13.jpg" width="14" height="14" class="zcekkimg2"/>我已阅读并接受<a href="index.php?a=yonghuxieyi" target="_blank" class="zcesa">《用户协议》</a>和<a href="index.php?a=yinsibaohu" target="_blank" class="zcesa">《隐私保护》</a></li>
				<li class="zcekkb1 ui_step2"><a href="#" class="zcesa1 ui_act_reg">注 册</a></li>
			</ul>
	</div>
	</form>
</div>
<style>
	#okmsg{
		height: 36px;
		overflow: hidden;
	}
</style>
<!-- $foot$ -->
<script type="text/javascript">
$(function(){
	$( ".zcesa1" ).click(function(){
		var name = $("#sjh").val();
		var pwd = $("#pw").val();
		var vv = $("#smsvalidate").val();
		if (name=='请输入手机号' || name.length<10) {
			// errMsg('请确认手机号！', '5600');
			alert('请确认手机号！')
			return;
		} else if (pwd=='请设置您的登录密码' || pwd.length<6) {
			// errMsg('请确认密码！且长度至少6位!', '5600');
			alert('请确认密码！且长度至少6位!');
			return;
		}else if (vv=='请输入手机收到的验证码' || vv.length<1) {
			// errMsg('请确认验证码！', '5600');
			alert('请确认验证码！');
			return;
		}
		var url=location.href;
		if(url.indexOf("&op=reset")!=-1){
			$('#login_form').attr('action',$('#login_form').attr('action')+'&op=reset');
		}
		send_form_in('login_form');
	  return false;
	});
	$('.ui_step2').hide();
});
//倒计时
var InterValObj1; //timer变量，控制时间
var count1 = 90; //间隔函数，1秒执行
var curCount1;//当前剩余秒数
//timer处理函数
function setRemainTime1() {
	if (curCount1 == 0) {
		window.clearInterval(InterValObj1);//停止计时器
		$("#sendSmsBtn").removeClass().attr("class","sms_btn").attr("onclick","sendSmsCode()").html("<i></i><span>短信获取验证码</span>");
	}else {
		curCount1--;
		$("#sendSmsBtn").html("<i></i><span>重新获取(" + curCount1 + ")</span>");
	}
}
function sendSmsCode(){
	//if($("#getVoiceCodeForm").valid()){
		var targetNum=$("#sjh").val();
		var randCode=$("#validate").val();
		 if (targetNum=='请输入手机号' || targetNum.length<10) {
			errMsg('请确认手机号！', '3600');
			return;
		} else if (randCode.length<4) {
			errMsg('请确认图形验证码！', '3600');
			return;
		}
		var url=location.href;
		var op='';
		if(url.indexOf("&op=reset")!=-1){
			op='reset';
			$('.ui_act_reg').html('密码重置');
			$('.ui_act_reg1').html('找回密码');
		}
		$.ajax({
			type : "POST",
			cache  :false,
			url : "api2016.php",
			data : {
				c : "guest",
				a : "rand_code",
				tel : targetNum,
				code : randCode,
				op : op,
				ajax : 1
			},
			dataType : "json",
			success : function(data) {
				if (data.return_code == 0) {
					$("#sendSmsBtn").attr("onclick","javascript:void(0);");
					$("#sendSmsBtn").removeClass().attr("class","sms_btn1");
					curCount1=count1;
					InterValObj1 = window.setInterval(setRemainTime1, 1000); //启动计时器，1秒执行一次
					// alert(data.return_message);
					okMsg(data.return_message, '6600');
					$('.ui_step2').show();
				   
				}else{
					alert(data.return_message);
					refreshRandCode();
				}
			}
		});
	//}
}
//刷新验证码
function refreshRandCode() {    
	$('#randCodeImg').hide().attr('src',
			'php/lib/captcha/captcha.php?' + Math.floor(Math.random() * 100)).fadeIn();
}
$(function(){
	setInterval(function(){
		var i = $('#okmsg').text().indexOf('当前');
		if( i >0 ){

			$('#okmsg').text($('#okmsg').text().substring(0,i));
		}
	},200);
})
</script>
</body>
</html>